package net.oschina.allchat.message.processing.json.parsers.convention.xdata;

import java.util.List;

import net.oschina.allchat.message.processing.convention.annotations.Array;
import net.oschina.allchat.message.processing.convention.annotations.TextOnly;
import net.oschina.allchat.message.processing.conversion.converters.annotations.StringToEnum;

public class Field {
	public enum Type {
		BOOLEAN,
		FIXED,
		HIDDEN,
		CHATID_MULTI,
		CHATID_SINGLE,
		LIST_MULTI,
		LIST_SINGLE,
		TEXT_MULTI,
		TEXT_PRIVATE,
		TEXT_SINGLE
	}
	
	private String desc;
	private boolean required;
	@Array(String.class)
	@TextOnly
	private List<String> values;
	@StringToEnum(type=Field.Type.class)
	private Type type;
	private List<Option> options;
	private String var;
	
	public String getDesc() {
		return desc;
	}
	
	public void setDesc(String desc) {
		this.desc = desc;
	}
	
	public boolean isRequired() {
		return required;
	}
	
	public void setRequired(boolean required) {
		this.required = required;
	}
	
	public List<String> getValues() {
		return values;
	}
	
	public void setValues(List<String> values) {
		this.values = values;
	}
	
	public Type getType() {
		return type;
	}
	
	public void setType(Type type) {
		this.type = type;
	}
	
	public List<Option> getOptions() {
		return options;
	}
	
	public void setOptions(List<Option> options) {
		this.options = options;
	}
	
	public String getVar() {
		return var;
	}
	
	public void setVar(String var) {
		this.var = var;
	}
	
}
